import request from '@/utils/request';

// 预上传
export function preUpload(data) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/preUpload/form`,
    method: 'put',
    data: data
  });
}

// 文件分端预上传
export function multipart(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/preUpload/url/multipart`,
    method: 'put',
    data: params
  });
}

export function multipartUpload(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/preUpload/url/multipart/` + params,
    method: 'post'
  });
}

export function multipartUploadList(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/preUpload/url/multipart/` + params + `/list`,
    method: 'post'
  });
}
